<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看活动通知</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/css/global.css" media="all">
    <link rel="stylesheet" href="/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/table.css" />
    <script type="text/javascript" src="/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="/js/global-config.js"></script>
    <script charset="utf-8" src="/plugins/kindeditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="/plugins/kindeditor/lang/zh-CN.js"></script>
    <script charset="utf-8" src="/plugins/kindeditor/plugins/code/prettify.js"></script>
    <script charset="utf-8" src="/js/kindEditor.js"></script>
</head>
<body>
<div style="margin: 15px;">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>查看活动通知</legend>
    </fieldset>
    <form class="layui-form" id="layui-form" action="" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">通知名称：</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" class="layui-input" value="${notice.noticeName!}" readonly>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-required-tip">通知内容：</label>
            <div class="layui-input-block" style="width: 92%;">
                <textarea id="noticeContent" class="layui-textarea">${notice.noticeContent!}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否推送：</label>
            <div class="layui-input-block" id="isPush" >
                <#if notice.isPush?? && notice.isPush == "1">
                        <input type="text" autocomplete="off" class="layui-input" value="是" readonly="readonly">
                    <#else>
                        <input type="text" autocomplete="off" class="layui-input" value="否" readonly="readonly">
                </#if>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">有无链接：</label>
            <div class="layui-input-block" id="isUrl" >
                <#if notice.isUrl?? && notice.isUrl == "1">
                        <input type="text" autocomplete="off" class="layui-input" value="有" readonly="readonly">
                    <#else>
                        <input type="text" autocomplete="off" class="layui-input" value="无" readonly="readonly">
                </#if>
            </div>
        </div>
        <#if notice.relation??>
            <div class="layui-form-item relation">
            <label class="layui-form-label">关联位置：</label>
            <div class="layui-input-block" id="relation" >
                <#if notice.relation == "1">
                        <input type="text" autocomplete="off" class="layui-input" value="URL" readonly="readonly">
                    <#elseif  notice.relation == "2">
                        <input type="text" autocomplete="off" class="layui-input" value="Native" readonly="readonly">
                     <#else>
                         <input type="text" autocomplete="off" class="layui-input" value="" readonly="readonly">
                </#if>
            </div>
        </div>
        </#if>
        <div class="layui-form-item">
            <label class="layui-form-label">URL/Native：</label>
            <div class="layui-input-block">
                <input type="text"  readonly="readonly" autocomplete="off" class="layui-input" value="${notice.redirectUrl!}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">发布时间:</label>
                <div class="layui-input-inline" style="width: 200px;">
                    <#if notice.publishMode?? && notice.publishMode == "1">
                        <input type="text" autocomplete="off" class="layui-input" value="立即" readonly="readonly">
                        <#else>
                            <input type="text" autocomplete="off" class="layui-input" value="定时" readonly="readonly">
                    </#if>
                </div>
                <div class="layui-input-inline"  id="publish-time" style="width: 200px;">
                    <input class="layui-input" value="${notice.publishTime?string('yyyy-MM-dd HH:mm:ss')}" readonly="readonly">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn layui-btn-primary" onclick="javascript:history.back();" >返回</button>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="/plugins/layui/layui.js"></script>
<script type="text/javascript" src="/js/global-config.js"></script>
<script>
    layui.use(['jquery','table','laydate','layer','form','util','layedit','upload','element'],function(){
        var $=layui.jquery,table=layui.table,laydate = layui.laydate,
            layer = layui.layer,form = layui.form,util=layui.util,
            layedit=layui.layedit,upload = layui.upload;

        //初始化kindeditor编辑器
        var keditor=initEditor("noticeContent");
        keditor.readonly(true);

        showHide("publish-time","${notice.publishMode!}" == "2");

        function showHide(id, show) {
            var str = "#"+id;
            if (show){
                $(str).show();
            }else{
                $(str).hide();
            }
            form.render();
        }
    });
</script>
</body>
</html>